module.exports = {
    pages: {
        index: {
            entry: "examples/src/main.js",
            template: "examples/public/index.html",
            filename: "index.html"
        },
        testTree: {
            entry: "examples/src/testTree.js",
            template: "examples/public/index.html",
            filename: "testTree.html"
        }
    },
    // 扩展 webpack 配置，使 packages 加入编译
    chainWebpack: config => {
        config.module
            .rule("js")
            .include
            .add("/packages")
            .end()
            .use("babel")
            .loader("babel-loader");
    }
};